﻿using System;

namespace EsbMonitorMessages.Domain
{
    public sealed class TypeInfo : ValueObject<TypeInfo>
    {
        public string TypeName { get; private set; }
        public MessageAssemblyInfo MessageAssemblyInfo { get; private set; }

        public TypeInfo(string typeName, MessageAssemblyInfo messageAssemblyInfo)
        {
            TypeName = typeName;
            MessageAssemblyInfo = messageAssemblyInfo;
        }

        public TypeInfo(Type type)
        {
            TypeName = type.FullName;
            MessageAssemblyInfo = new MessageAssemblyInfo(type.Assembly);
        }
    }
}